<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./utils/reset.css" />
    <title>00模板</title>
  </head>
  <body>
    <canvas id="canvas"></canvas>

    <script type="shader-source" id="vertexShader">
      void main(){

      }
    </script>
    <script type="shader-source" id="fragmentShader">
        void main(){

      }
    </script>
    <script src="./utils/webgl-helper.js"></script>
    <script>
      const canvas = getCanvas("#canvas");
      resizeCanvas(canvas);

      const gl = getContext(canvas);

      const program = createSimpleProgramFromScript(
        gl,
        "vertexShader",
        "fragmentShader"
      );
      gl.useProgram(program);

      gl.clearColor(0, 0, 0, 1);
      function render(gl) {
        gl.clear(gl.COLOR_BUFFER_BIT);
      }
      render(gl);
    </script>
  </body>
</html>
